package com.hhf.demo_04;

import java.util.concurrent.ArrayBlockingQueue;

/**
 * @Author: 黄恒锋
 * @DateTime: 2024/5/11 20:41
 * @Description: TODO
 */
public class App {

    public static void main(String[] args) {
        ArrayBlockingQueue<String> queue = new ArrayBlockingQueue<>(1);
        Cook cook = new Cook(queue);
        Foodie foodie = new Foodie(queue);
        Thread t1 = new Thread(cook);
        Thread t2 = new Thread(foodie);
        t1.start();
        t2.start();
    }
}
